(function($){

    //跑马灯
    $.fn.marqueen=function(argu){
        var a=$(this);
        
        var speed = 30 ;
        var margin_top = 0;
        var html_cot = a.children('ul').html();
        var cot_h = a.children('ul').height();
        a.children('ul').append(html_cot);

        a.css('overflow','hidden');

        // console.log(cot_h);

        function Marquee(){
            margin_top--;
            if(margin_top<=-1*cot_h){
                margin_top=0;
            }
            a.children('ul').css('marginTop',margin_top);
        }


        var mar=setInterval(Marquee,speed);
        a.mouseover(function(){
            clearInterval(mar);
        })

        a.mouseout(function(){
            mar = setInterval(Marquee,speed);
        })
        
    }
   
})(jQuery);
